]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Wire up search up/down
authorColin Walters <walters@verbum.org>
Thu, 2 Jul 2009 05:02:46 +0000 (01:02 -0400)
committerColin Walters <walters@verbum.org>
Thu, 2 Jul 2009 05:04:40 +0000 (01:04 -0400)
This is not a complete fix; the search selection will not cross
the apps/docs boundary.  But it's good enough until we have a more
final search design.

js/ui/overlay.js

index 478719fe99b52142bc696a39b8b35c554e2c7d77..e16423e2c5ec0a23d6fe58d00e6ebf39442b0b65 100644 (file)
@@ -314,9 +314,19 @@ Dash.prototype = {
                 // too, but there doesn't seem to be any flickering if we first select
                 // something in one display, but then unset the selection, and move
                 // it to the other display, so it's ok to do that.
-                // TODO: add the right logic
+                if (me._resultsDocsSection.display.hasSelected())
+                  me._resultsDocsSection.display.selectUp();
+                else if (me._resultsAppsSection.display.hasItems())
+                  me._resultsAppsSection.display.selectUp();
+                else
+                  me._resultsDocsSection.display.selectUp();
             } else if (symbol == Clutter.Down) {
-                // TODO: add the right logic
+                if (me._resultsDocsSection.display.hasSelected())
+                  me._resultsDocsSection.display.selectDown();
+                else if (me._resultsAppsSection.display.hasItems())
+                  me._resultsAppsSection.display.selectDown();
+                else
+                  me._resultsDocsSection.display.selectDown();
             }
             return false;
         });